import type { Trademark } from '../trademark/type'
export interface SpuData {
    id?: number,
    spuName: string,
    description: string,
    category3Id: number | string,
    tmId: number,
    spuSaleAttrList: null | SpuHasSaleAttr[],
    spuImageList: null | SpuImage[],
}
export interface SpuResponseData {
    code: number,
    message: string,
    ok: boolean,
    data: {
        records: SpuData[],
        total: number,
        size: number,
        current: number,
        searchCount: boolean,
        pages: number
    }
}

export interface AllTradeMarkResponseData {
    code: number,
    message: string,
    ok: boolean,
    data: Trademark[]
}

export interface SpuImage {
    id?: number,
    createTime?: string,
    updateTime?: string,
    spuId?: number,
    imgName?: string,
    imgUrl?: string
}

export interface SpuImageResponseData {
    code: number,
    message: string,
    ok: boolean,
    data: SpuImage[]
}

export interface SpuHasSaleAttrValue {
    id?: number,
    createTime?: string,
    updateTime?: string,
    spuId?: number,
    baseSaleAttrId: number,
    saleAttrValueName: string,
    saleAttrName?: string,
    isChecked?: string
}
export interface SpuHasSaleAttr {
    id?: number,
    createTime?: string,
    updateTime?: string,
    spuId?: number,
    baseSaleAttrId: number,
    saleAttrName: string,
    spuSaleAttrValueList: SpuHasSaleAttrValue[],
    attridandvalueid?:string
}
export interface SpuHasSaleAttrResponseData {
    code: number,
    message: string,
    ok: boolean,
    data: SpuHasSaleAttr[]
}

export interface BaseSaleAttr {
    id: number,
    name: string
}
export interface BaseSaleAttrResponseData {
    code: number,
    message: string,
    ok: boolean,
    data: BaseSaleAttr[]
}
interface skuAttrValue {
    attrId: number,
    valueId: number,
    valueName?:string
}
interface skuSaleAttrValue {
    saleAttrId: number,
    saleAttrValueId: number,
    saleAttrValueName?:string
}
export interface SkuInfoData {
    category3Id: number | string,
    spuId: number,
    tmId: number,
    skuName: string,
    price: number,
    weight: number,
    skuDesc: string,
    skuAttrValueList?:skuAttrValue[],
    skuSaleAttrValueList?:skuSaleAttrValue[]
    skuDefaultImg?: string,
}

export interface SkuInfoDataResponseData {
    code: number,
    message: string,
    ok: boolean,
    data: SkuInfoData[]
}

